﻿@{
    ViewBag.Title = "Fromular de confirmare";
}

<h2>Formular de confirmare</h2>


@model List<PYS.VoteWorkflow>

@using (Html.BeginForm())
{
   string nameMix="", src="";
    
   if (Model == null)
    {
    <h3>Votul a fost inregistrat cu succes!</h3>
    @Html.ActionLink("OK", "../Home", new{id=""}, new { @class = "forwardButton" })
    }
   else
   {
       <h4>*Pentru a schimba un mix ales, apasati pe sageata aferenta coregrafiei.</h4>
      <div class="tabelConfirmPage">
        @foreach (PYS.VoteWorkflow workFlow in Model)
        {
           <div class="rowTabelConfirmPage">
                 <span class="leftColumnConfirmPage">            
                   @Html.ActionLink("text", "Vote", new { id1 = (int)Session["CourseID"], id2 = @workFlow.chTypeID, id3 = @workFlow.chTypeID }, new { @class = "backImageLink" })
                  <span class="textLinkBackToVote"> Coregrafia @workFlow.chTypeID  ( @workFlow.chName )</span>
                 </span>
                 <span class="rightColumnConfirmPage">
                   <span class="textLinkBackToVote"> - @workFlow.mixName</span>
                 </span>   
            </div>
            nameMix = workFlow.mixName;
            if (nameMix != null)
            {
                nameMix = nameMix.ToLower();
                nameMix = nameMix.Replace(" ", "");
                src = "../Music/" + nameMix + "/" + workFlow.chTypeID + ".mp3";
            
                <div class="rowTabelConfirmPage">
                     <audio controls style="width:120%">
                         <source src=@src type="audio/mpeg"/>
                         <source src=@src type="audio/ogg"/>
                         <source src=@src type="audio/wav"/>
                     </audio>
                </div>      
                <br />
            }
        }
        </div>
       <input type="submit" value="Voteaza" class="forwardButton"/>
   }

}